//
//  PushParticularsViewController.m
//  Ai
//
//  Created by 杜超男 on 2019/3/8.
//  Copyright © 2019年 杜超男. All rights reserved.
//

#import "PushParticularsViewController.h"
#import "PushParticularsTableViewCell.h"
@interface PushParticularsViewController ()<UITableViewDelegate , UITableViewDataSource>
@property (nonatomic , strong)UITableView *tableView;
@property (nonatomic , strong)NSArray *StudentName;
@property (nonatomic , strong)NSArray *PushState;
@property (nonatomic , strong)NSArray *PushTime;
@property (nonatomic , strong)NSArray *SentPicture;
@end

@implementation PushParticularsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.StudentName = [[NSArray alloc] initWithObjects:@"刘庆" , @"上官晓晓" , @"张浩然" , @"上官晓晓" , @"张浩然" , @"上官晓晓", nil];
    self.PushState = [[NSArray alloc] initWithObjects:@"未推送" , @"未推送" , @"未推送" , @"已推送" , @"已推送" , @"已推送", nil];
    self.PushTime = [[NSArray alloc] initWithObjects:@"— —" , @"— —" , @"— —" , @"2019/10/23  12:00" , @"2019/10/23  12:00" , @"2019/10/23  12:00", nil];
    self.SentPicture = [[NSArray alloc] initWithObjects:@"— —" , @"— —" , @"— —" , @"10" , @"3" , @"4", nil];
    // Do any additional setup after loading the view from its nib.
    [self.view addSubview:self.tableView];
}
-(UITableView *)tableView{
    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 220, 440, self.view.frame.size.height - 80) style:UITableViewStylePlain];
    _tableView.delegate = self;
    _tableView.dataSource = self;
    [_tableView registerNib:[UINib nibWithNibName:@"PushParticularsTableViewCell" bundle:nil] forCellReuseIdentifier:@"cell"];
    return _tableView;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.StudentName.count;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    PushParticularsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    if (!cell) {
        cell = [[PushParticularsTableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"cell"];
    }
    cell.Name.text = self.StudentName[indexPath.row];
    cell.Push.text = self.PushState[indexPath.row];
    cell.Time.text = self.PushTime[indexPath.row];
    cell.Number.text = self.SentPicture[indexPath.row];
    return cell;
}
-(void)viewWillAppear:(BOOL)animated{
    self.navigationController.navigationBar.hidden = YES;
    self.tabBarController.tabBar.hidden = YES;
}
- (IBAction)BackBtn:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
